﻿using System;

namespace _02.CompareArraysElementByElement
{
    class CompareArraysElementByElement
    {
        static void Main()
        {
            Console.Write("Enter lenght of array:");
            int lenghtOfArrays = int.Parse(Console.ReadLine());
            int[] firstArray = new int[lenghtOfArrays];
            int[] secondArray = new int[lenghtOfArrays];
            Console.WriteLine("Enter elements of first array.The elements must be integer numbers.");
            for (int i = 0; i < lenghtOfArrays; i++)
            {
                firstArray[i] = int.Parse(Console.ReadLine());
            }
            Console.WriteLine("Enter elements of second array.The elements must be integer numbers.");
            for (int i = 0; i < lenghtOfArrays; i++)
            {
                secondArray[i] = int.Parse(Console.ReadLine());
            }
            bool equal = true;
            for (int i = 0; i < lenghtOfArrays; i++)
            {
                if (firstArray[i] != secondArray[i])
                {
                    equal = false;
                    break;
                }
            }
            if (equal == true)
            {
                Console.WriteLine("Arrays are equal");
            }
            else
            {
                Console.WriteLine("Arrays are not equal");
            }
        }
    }
}
